<ui:composition template="/template/template.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

	<ui:define name="centerbody">
		<p:panelGrid columns="2">
			<p:outputLabel value=" Identificador do pedido: "></p:outputLabel>
			<p:inputText label="Identificador do pedido"
				value="#{salesPurchasesBean.salesPurchase.cdpurchase}"></p:inputText>

			<p:outputLabel value="Data: (dd/MM/yyyy)" for="campo-aniversario" />
			<p:inputText id="campo-aniversario"
				value="#{salesPurchasesBean.salesPurchase.dtpurchase}">
				<f:convertDateTime pattern="dd/MM/yyyy" />
			</p:inputText>
			<p:message id="message" for="campo-aniversario" />
			<p:graphicImage library="customer" name="house.jpg"></p:graphicImage>
			<p:commandButton update="salespurchaselist,message" value="+"
				action="#{salesPurchasesBean.addSalesPurchase}"></p:commandButton>
		</p:panelGrid>
		<p:dataTable id="salespurchaselist" resizableColumns="true"
			style="padding-top:10px" var="salespurchase"
			value="#{salesPurchasesBean.salesPurchases}">
			<p:column headerText="Código">
				<h:outputText value="#{salespurchase.cdpurchase}" />
			</p:column>
			<p:column headerText="Data">
				<h:outputText value="#{salespurchase.dtpurchase}" />
			</p:column>
		</p:dataTable>
	</ui:define>
</ui:composition>


